<?php
namespace app\home\validate;

use think\Validate;

class User extends  Validate{

    protected $rule=[
        'user_name'=>'require|min:6|max:20',
        'nick_name'=>'require|min:2|max:16',
        'pass_word'=>'require|min:6|max:16',
        'phone'=>'require|min:11|max:11',
    ];
    protected $message=[
        'user_name.require'=>"账号不能为空",
        'user_name.min'=>"账号长度最少6",
        'user_name.max'=>"账号长度最长20",
        'nick_name.require'=>"昵称不能为空",
        'nick_name.min'=>"昵称长度最少为2",
        'nick_name.max'=>"昵称长度最多为16",
        'pass_word.require'=>"密码不能为空",
        'pass_word.min'=>"密码长度最少为6",
        'pass_word.max'=>"密码长度最多为16",
        'phone.require'=>"手机号码不能为空",
        'phone.min'=>"手机号码格式错误",
        'phone.max'=>"手机号码格式错误",
    ];

}